import request from '@/utils/request'

// 获取客户列表
export function getClientsList(params) {
  return request({
    url: '/clients',
    params
  })
}

// 新建客户
export function addClients(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}

// 编辑客户
export function editClients(id) {
  return request({
    url: '/clients/' + id,
    method: 'put'
  })
}

// 删除客户
export function delClients(id) {
  return request({
    url: '/clients/' + id,
    method: 'delete'
  })
}

// 更新客户
export function updateClients(data) {
  return request({
    url: '/clients/' + data.id,
    method: 'put',
    data
  })
}

// 获取客户数量
export function getClientsCount(params) {
  return request({
    url: '/clients/count',
    params
  })
}

export function getAgentsList(params) {
  return request({
    url: '/agents',
    params
  })
}
